package com.hhkj.api.invoice.model.req;

import com.hhkj.admin.invoice.common.cont.InvoiceConst;
import com.hhkj.admin.invoice.model.dopo.InvoiceDo;
import com.ruoyi.common.valid.emun.EnumValueCheck;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

/**
 * ApiSaleInvoiceReq
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/11/6 15:02
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ApiInvoiceReq extends InvoiceDo {

    @NotNull(message = "订单id为空")
    @Override
    public Long getOrderId() {
        return super.getOrderId();
    }

    @NotNull(message = "发票抬头类型为空")
    @EnumValueCheck(message = "发票抬头类型不正确", target = InvoiceConst.TitleTypeCode.class)
    @Override
    public String getTitleTypeCode() {
        return super.getTitleTypeCode();
    }
}
